using System;

namespace PropertyExpression.PresentationCode
{
    public static class ElementExtensions
    {
        public static IElement<T> Name<T>(this IElement<T> it, string value)
        {
            it.Name = value;
            return it;
        }

        public static IElement<T> NameOut<T>(this IElement<T> it, out IElement<T> target)
        {
            return it.Name(Guid.NewGuid().ToString("N")).Out(out target);
        }
    }
}